package com.gg.registration.vo.user;

import lombok.Data;

import java.util.Objects;

@Data
public class LoginVo {

    //用户openid
    private String openid;

    //用户手机号
    private String phone;

    //手机验证码
    private String code;

    //ip地址
    private String ip;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LoginVo loginVo = (LoginVo) o;
        return Objects.equals(openid, loginVo.openid) &&
                Objects.equals(phone, loginVo.phone) &&
                Objects.equals(code, loginVo.code) &&
                Objects.equals(ip, loginVo.ip);
    }

    @Override
    public String toString() {
        return "LoginVo{" +
                "openid='" + openid + '\'' +
                ", phone='" + phone + '\'' +
                ", code='" + code + '\'' +
                ", ip='" + ip + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(openid, phone, code, ip);
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
